package com.cloudknows.parser;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import com.cloudknows.semantic.Semantic;

public class SemanticParser {

    List<SemanticParser> psrList = new ArrayList<SemanticParser>();

    public Semantic parse(String queryStr) {
        Semantic stc = new Semantic();
        Iterator<SemanticParser> itr = psrList.iterator();
        while (itr.hasNext()) {
            SemanticParser psr = itr.next();
            Semantic s = psr.parse(queryStr);
            if (null != s) {
                stc.addSemantic(s);
            }
        }
        return stc;
    }
}
